---
title: Sparkles Text
date: 2024-05-30
description: A dynamic text that generates continuous sparkles with smooth transitions, perfect for highlighting text with animated stars.
author: nyxb
published: true
---

<ComponentPreview name="sparkles-text-demo" />


### Installation

<Tabs defaultValue="cli">

<TabsList>
  <TabsTrigger value="cli">CLI</TabsTrigger>
  <TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>
<TabsContent value="cli">

```bash
npx nyxb@latest add sparkles-text
```

</TabsContent>

<TabsContent value="manual">

<Steps>

Copy and paste the following code into your project.

```text
components/ui/sparkles-text.tsx
```

<ComponentSource name="sparkles-text" />

</Steps>

</TabsContent>

</Tabs>

## Props

| Prop          | Type   | Description                                        | Default                                  |
| ------------- | ------ | -------------------------------------------------- | ---------------------------------------- |
| text          | string | The text to display                                | -                                        |
| className     | string | The class name to be applied to the sparkles text. | -                                        |
| sparklesCount | number | sparkles count that appears on the text            | 10                                       |
| colors        | object | the sparkles colors                                | `{first: '#A07CFE'; second: '#FE8FB5';}` |

